<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script type="text/javascript">
			
		 /**
			 *   10进制            0    1    2        3        4        5            6        7
			 *   二进制          0    1    10        011        100        101            110        111
			 *   
			 *  1 0 0 
			 *  1 0 1 
			 * 	1 0	0
			 */

			let numa = 3;  // 0 1 1
			let numb = 4;  // 1 0 0

			console.log("numa: 011 ")
			console.log("numb: 100 ")
			let numc = numa & numb;
			console.log("numc: "+numc)
			console.log("100 & 101: "+(4&5)) ;// 4

			let numd = numa | numb;
			console.log("numd: "+numd) ;//7


			console.log("numa << 1 "+ (numa << 1)); // 011  <<1   110
			console.log("numa >> 1 "+ (numa >> 1));// 011 >>1    
			//无符号的位移
			let nume = -3;
			console.log("nume >>> 1 "+ (nume >>> 1));   //2147483646   
	
					
		</script>
	</head>
	<body>
		
		
		
		
		
		
		
	</body>
</html>
